<template>
  <div>
    <div class="app-container" style="">
      <h2>表单示例</h2>
      <el-form ref="form" :model="form" label-width="120px">
        <el-form-item label="图片选择器">
          <dk-image-input v-model="form.img" />
        </el-form-item>
        <el-form-item label="文件选择器">
          <!--          <dk-file-input v-model="form.file" />-->
          <dk-video-input v-model="form.video" />
        </el-form-item>
        <el-form-item label="链接选择器">
          <dk-link-input v-model="form.link" :show-input="false" />
        </el-form-item>
        <el-form-item label="链接选择器">
          <dk-link-input v-model="form.noInputLink" :show-input="true" />
        </el-form-item>
        <el-form-item label="图链选择器">
          <dk-image-url-input v-model="form.imageUrl" btn-name="添加广告" />
        </el-form-item>
        <el-form-item label="应用组选择器">
          <dk-addon-group-select />
        </el-form-item>
        <el-form-item label="应用选择器">
          <dk-addon-select v-model="form.test" />
        </el-form-item>
        <el-form-item label="空内容">
          <dk-empty />
        </el-form-item>
        <el-form-item label="图标选择器">
          <dk-icon-input />
        </el-form-item>
        <el-form-item>
          <el-button type="primary" @click="onSubmit">立即创建</el-button>
          <el-button>取消</el-button>
        </el-form-item>
      </el-form>
    </div>
    <div class="dashboard-container app-container" style="font-size: 20px;">111
      <el-row :gutter="20">
        <el-col :span="6">用户名</el-col>
        <el-col :span="18">{{ userinfo.username }}</el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :span="6">管理组</el-col>
        <el-col :span="18">{{ userinfo.group }}</el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :span="6">按钮权限</el-col>
        <el-col :span="18">
          {{ userinfo.authMark }}
        </el-col>
      </el-row>
    </div>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'
import auth from '@/directive/auth'
import DkLinkInput from '@/components/HiDuoKe/DkForm/DkLinkInput/index'
export default {
  name: 'Dashboard',
  components: { DkLinkInput },
  directives: {
    auth
  },
  data() {
    return {
      dialogVisible: true,
      form: {
        link: {
          title: 'aaaa'
        },
        imageUrl: [],
        name: '',
        region: '',
        date1: '',
        date2: '',
        delivery: false,
        type: [],
        resource: '',
        desc: '',
        img: '',
        file: '',
        test: {}
      }
    }
  },
  computed: {
    ...mapGetters([
      'userinfo'
    ])
  },
  methods: {
    onSubmit() {
      console.log(this.form)
    }
  }
}
</script>

<style lang="scss" scoped>
.dashboard {
  &-container {
  }
  &-text {
    font-size: 30px;
    line-height: 46px;
  }
}
</style>
